package com.verify.emun;

public enum PO {
    INTERNAL_RETIRED("内部退养"),
    OTHER_NOT_ON_DUTY("其他不在岗"),
    SUSPENDED("停工"),
    ROSTERED_OFF("轮休"),
    ON_WAIT("待岗"),
    LEAVE_OF_ABSENCE("停薪留职"),
    MATERNITY_LEAVE("哺乳假"),
    MATERNITY_LEAVE2("产假"),
    PRE_MATERNITY_LEAVE("产前假"),
    WORK_INJURY_LEAVE("工伤假"),
    LONG_TERM_SICK_LEAVE("长病假"),
    EXTERNAL_ASSIGNMENT("外派"),
    LOANED("外借");
    private final String name;

    // 构造方法，用于初始化name属性
    PO(String name) {
        this.name = name;
    }

    // 获取name属性的值
    public String getName() {
        return name;
    }

    // 静态方法：检查传入的字符串是否包含在枚举值中
    public static boolean contains(String value) {
        for (PO org : PO.values()) {
            if (org.getName().equals(value)) {
                return true;
            }
        }
        return false;
    }
}
